package xyz.xtt.asset.service.impl;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import xyz.xtt.asset.entity.TblAssetGroupMember;
import xyz.xtt.asset.mapper.TblAssetGroupMemberMapper;
import xyz.xtt.asset.service.ITblAssetGroupMemberService;

/**
 * <p>
 * 群成员 服务实现类
 * </p>
 *
 * @author author
 * @since 2025-01-22
 */
@Service
public class TblAssetGroupMemberServiceImpl extends ServiceImpl<TblAssetGroupMemberMapper, TblAssetGroupMember> implements ITblAssetGroupMemberService {
	@Override
	public TblAssetGroupMember queryGroupMember(Long groupId, Long uid) {
		LambdaQueryChainWrapper<TblAssetGroupMember> query = new LambdaQueryChainWrapper<>(baseMapper);
		return query.eq(TblAssetGroupMember::getGroupId, groupId).eq(TblAssetGroupMember::getUid, uid).eq(TblAssetGroupMember::getState, 1).one();
	}
}
